import React, { useState } from 'react';
import {View,Text,Image,Block} from "@tarojs/components";
import "./listItem.less";
import AvGroup from "@/components/avGroup/index";
interface props{
     data:{[key:string]:any},
     onClick?:Function,
     ontouchstart?:Function,
     ontouchEnd?:Function,
     touchcancel?:Function,
     touchmove?:Function
}
function ListItem(props:props){
     let data = props.data;
     return (
         <View  onCLick={props.onClick} onTouchMove={props.touchmove} onTouchStart={props.ontouchstart} onTouchEnd={props.ontouchEnd} onTouchCancel={props.touchcancel} className="Listitem p-2 bg-white flex items-center text-red-500  max-w-screen-full">
            <View className="imgView mr-2">
                <AvGroup num={data.len}/>
            </View>
             <View className="flex-col justify-center">
                <View className="text-gray-900 text-lg title">{data.item&&data.item.gName}</View>
                <View  className="text-gray-500 text-xs">{data.item&&data.item.lastMsg}</View>
             </View>
         </View>
     )
}

export default ListItem